using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using ObjectSerializers.Abstractions;

namespace ObjectSerializers.MessagePackSerializer
{
    public static class Extensions
    {
        /// <summary>
        /// 添加 MessagePackSerializer 相关服务
        /// </summary>
        /// <param name="services"></param>
        public static void AddMessagePackSerializer(this IServiceCollection services)
        {
            services.TryAddSingleton<ISerializerContext, Context>();
        }
    }
}